package com.kevin.ssh2jquery.dto;

/**
 *	Author:     Kevin.du
 *	CreateTime: 2010-8-2-下午12:38:54
 *	ProjectName:51gen
 *	ClassName:  User.java
 *
 *	This Class Or Method Create by Kevin.du 
 *
 *	Copyright ownership belongs to Vilii Kevin, shall not be reproduced , 
 *	copied, or used in other ways without permission.
 *	Otherwise Vilii.Kevin will have the right to pursue legal responsibilities. 
 **/

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

@MappedSuperclass
@Entity
// 表名与类名不相同时重新定义表名.
@Table(name = "user")
// 默认的缓存策略.
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class User implements java.io.Serializable {

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Integer id;

	@Column(name = "name", length = 45)
	private String name;

	@Column(name = "password", length = 45)
	private String password;

	public User() {
	}

	public User(String name, String password) {
		this.name = name;
		this.password = password;
	}

	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPassword() {
		return this.password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

}
